package com.batchengine.action;

import com.batchengine.Definitions;
import static com.batchengine.Definitions.ContextParams.ARGUMENTS;
import static com.batchengine.Definitions.ContextParams.TASK_CLASS;
import static com.batchengine.Definitions.TaskType.PLSQL;
import com.batchengine.task.TaskContext;
import com.batchengine.util.LoggingFactory;
import org.apache.log4j.Logger;

/**
 * User: sunil.incubator@yahoo.com
 * Date: Sep 19, 2009
 * Time: 11:39:38 PM
 */
public class PlSqlAction implements Action {

    private static final Logger logger = LoggingFactory.createLogger();

    @Override
    public Object execute(TaskContext context) {

        try {

            String plsqlName = (String) context.getContextParam(TASK_CLASS);
            Object[] arguments = (Object[]) context.getContextParam(ARGUMENTS);

        } catch (Exception e) {
            logger.error("error@PlSqlAction#execute", e);
        }
        return null;
    }

    @Override
    public Definitions.TaskType getType() {
        return PLSQL;
    }
}
